<?php
namespace Mobile\Controller;
use Think\Controller;
use Common\Model\File;
class DetailController extends Controller {
    public function index(){
        $id = $_GET['id'];
        $movie=M('movie')->where(['id'=>$id])->select();
            foreach($movie as $key=>$val ){
                $img = File::sub($val['cover']).$val['cover'];
                $movie[$key]['cover']= '/Public/Uploads/'.$img;
                $movie[$key]['release_at']=date('Y年m月d日',time($movie[$key]['release_at']));

        }
        //var_dump($movie);
        $this->assign('list',$movie);
        $this->display();
    }
}